{include file='public/head,public/nav'}

    <div class="page-body">
        <div class="filter-bg">
            <div class="filter-wrap">
                <div class="w-filter-ab-test">
                    <div class="w-filter-top-nav clearfix" style="margin:12px">
                        
                        
                    </div>
                    
                    <div class="filter-wrapper">
                        <div class="normal-filter ">
                            <div class="w-filter-normal-ab  filter-list-ab">
                                <h5 class="filter-label-ab">分类</h5>
                                <span class="filter-all-ab">
                                    <a href="{:url('lists/index',['order' => $order])}" class="w-filter-item-ab  item-all-auto-ab"><span class="item-content {if condition='$id eq 0'}filter-active-all-ab{/if} ">全部</span></a>
                                </span>
                                <div class="j-filter-items-wrap-ab filter-items-wrap-ab">
                                    <div class="j-filter-items-ab filter-items-ab filter-content-ab">
                                        
                                        {volist name='categorys' id='vo'}
                                        {if condition='$vo.parent_id eq 0'}
                                        <a href="{:url('lists/index',['id'=>$vo.id,'parentId' => 0,'order' => $order])}" class="w-filter-item-ab"><span class="item-content {if condition='$vo.id eq $id || $vo.id eq $parentId'}filter-active-all-ab{/if} ">{$vo.name}</span></a>
                                        {/if}
                                        {/volist}
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    {if condition='$parentId egt 0'}
                    <div class="filter-wrapper">
                        <div class="normal-filter ">
                            <div class="w-filter-normal-ab  filter-list-ab">
                                <h5 class="filter-label-ab">子分类</h5>
                                <span class="filter-all-ab">
                                    <a {if condition='$parentId eq 0'} href="{:url('lists/index',['id'=>$id,'parentId' => $parentId,'order' => $order])}" {else/} href="{:url('lists/index',['id'=>$parentId,'parentId' => 0,'order' => $order])}" {/if} class="w-filter-item-ab  item-all-auto-ab"><span class="item-content {if condition='$parentId eq 0'}filter-active-all-ab{/if} ">全部</span></a>
                                </span>
                                <div class="j-filter-items-wrap-ab filter-items-wrap-ab">
                                    <div class="j-filter-items-ab filter-items-ab filter-content-ab">
                                        {volist name='categorys' id='vo'}
                                        {if condition='$parentId eq 0'}
                                        {if condition='$vo.parent_id eq $id'}
                                        <a href="{:url('lists/index',['id'=>$vo.id,'parentId' => $vo.parent_id,'order' => $order])}" class="w-filter-item-ab"><span class="item-content {if condition='$vo.id eq $id'}filter-active-all-ab{/if}">{$vo.name}</span></a>
                                        {/if}
                                        {else /}
                                        {if condition='$vo.parent_id eq $parentId'}
                                        <a href="{:url('lists/index',['id'=>$vo.id,'parentId' => $vo.parent_id,'order' => $order])}" class="w-filter-item-ab"><span class="item-content {if condition='$vo.id eq $id'}filter-active-all-ab{/if}">{$vo.name}</span></a>
                                        {/if}
                                        {/if}
                                        {/volist}

                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    {/if}
                </div>
                <div class="w-sort-bar">
                    <div class="bar-area" style="position: relative; left: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; top: 0px;">
                        <span class="sort-area">
                            <a href="{:url('lists/index',['id'=>$id,'parentId'=>$parentId])}"  class="sort-item {if condition="$order eq ''"}sort-default-active{/if} ">默认</a>
                            <a href="{:url('lists/index',['id'=>$id,'parentId'=>$parentId,'order'=>'buy_count'])}"  class="sort-item {if condition="$order eq 'buy_count'"}sort-default-active {/if}" title="点击按销量降序排序">销量↓</a>
                            <a href="{:url('lists/index',['id'=>$id,'parentId'=>$parentId,'order'=>'current_price'])}"  class="sort-item {if condition="$order eq 'current_price'"}sort-default-active{/if} " title="点击按价格降序排序">价格↓</a>
                            
                            <a href="{:url('lists/index',['id'=>$id,'parentId'=>$parentId,'order'=>'create_time'])}"  class="sort-item {if condition="$order eq 'create_time'"}sort-default-active{/if} " title="发布时间由近到远">最新发布↑</a>
                        </span>
                        
                    </div>
                </div>
                <ul class="itemlist eight-row-height">
                    {volist name='deals' id='vo'}
                    <li class="j-card">
                                <a href="{:url('detail/index',['id'=>$vo.id])}" target="_blank">
                                    <div class="imgbox">
                                        <ul class="marketing-label-container">
                                            <li class="marketing-label marketing-free-appoint"></li>
                                        </ul>
                                        <div class="range-area">
                                            <div class="range-bg"></div>
                                            <div class="range-inner">
                                                <span class="white-locate"></span>
                                                安贞 六里桥 丽泽桥 安定门 劲松 昌平镇 航天桥 通州区 通州北苑
                                            </div>
                                        </div>
                                        <div class="borderbox">
                                            <img src="{$vo.image}" />
                                        </div>
                                    </div>
                                </a>
                                <div class="contentbox">
                                    <a href="{:url('detail/index',['id'=>$vo.id])}" target="_blank">
                                        <div class="header">
                                            <h4 class="title ">{$vo.location_ids|countLocation}</h4>
                                        </div>
                                        <p>{$vo.name}</p>
                                    </a>
                                    <div class="add-info"></div>
                                    <div class="pinfo">
                                        <span class="price"><span class="moneyico">¥</span>{$vo.current_price}</span>
                                        <span class="ori-price">市场价<span class="price-line">¥<span>{$vo.origin_price}</span></span></span>
                                    </div>
                                    <div class="footer">
                                        <span class="comment">4.6分</span><span class="sold">已售{$vo.buy_count}</span>
                                        <div class="bottom-border"></div>
                                    </div>
                                </div>
                            </li>
                    {/volist}
                </ul>
                <div class="cl pd-5 bg-1 bk-gray mt-20 kv-page">{$deals->render()}</div>
            </div>
        </div>

        <!-- <div class="content-wrap">共<span style="color: #ff4883">4321</span>条</div> -->
    </div>

    <div class="footer-content">
        <div class="copyright-info">
            
        </div>
    </div>
    <script>
        $(".tab-item-wrap").click(function(){
            var index = $(".tab-item-wrap").index(this);
            $(".tab-item-wrap").removeClass("selected");
            $(".district-cont-wrap").css({display: "none"});
            $(this).addClass("selected");
            $(".district-cont-wrap").eq(index).css({display: "block"});
        });

        $(".sort-area a").click(function(){
            $(".sort-area a").removeClass("sort-default-active").css({color: "#666"});
            $(this).addClass("sort-default-active").css({color: "#ff4883"});
        });
    </script>
</body>
</html>